swing optimization